@layout("/common/_container.html"){
<style>
    .input-group{
        /*width:45%;*/
    }
    .row input[type=text],.form-control, .single-line{
        width:35%;
        float:left;
    }
    .input-group .form-control {
        width: 90%;
    }
    .error{
        color:red;
        float:left;
        padding-top: 7px;
        padding-left: 10px;
    }
    .isShow label{
        padding-right:10px;
        padding-top:3px;
    }
    .input-group{
        width:60%;
       margin-left: 308px;
    }
    .row input[type=text]{
        width:45%;
    }
    .error{
        color:red;
    }
    .modalP{
        position: absolute;
        left: 343px;
        top: 29px;
        font-size: 13px;
        font-weight: 700;
    }
    .file-caption{
        width: 549.44px !important;
        margin-left: 64px;
    }
    .input-group-btn:last-child>.btn, .input-group-btn:last-child>.btn-group {
        z-index: 2;
        margin-left: -290px;
    }
</style>
<style type="text/css">
    .file-thumbnail-footer{
        display: none;
    }
</style>
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">

            <input type="hidden" id="id" value="">
            <input type="hidden" id="istatus" value="1">
            <input type="hidden" id="classUrl" name="视频播放路径"  underline="false"/>
            <input type="hidden" id="videoId" name=""  underline="false"/>
            <div class="row">

                <#Select id="classType" name="视频类型">

                </#Select>

                <!--<#input id="classId" name="id" underline="true"/>-->
                <#input id="className" name="视频课程名称" underline="false"/>
                <#avatar id="classImg" name="视频图片" underline="false"/>
                <#input id="creatWriter" name="视频作者" underline="false"/>
                <#input id="introduce" name="视频介绍" underline="false"/>
                <#input id="classTitle" name="视频标题" underline="false"/>
            </div>

                <div class="modal-body">
                    <!--<a href="~/Data/ExcelTemplate/Order.xlsx" class="form-control" style="border:none;">下载导入模板</a>-->
                 <span class="modalP">视频</span><input type="file" name="fileName" id="fileName" multiple class="file-loading mondalInp"  data-show-caption="true"/>
                </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="SktClassInfoDlg.addSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="SktClassInfoDlg.close()"/>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('#fileName').fileinput({
            language: 'zh', //设置语言
            uploadUrl: Feng.ctxPath + "/sktClass/uploadfile", //上传的地址
            // allowedFileExtensions : ['jpg', 'png','gif','doc/docx'],//接收的文件后缀,
            maxFileCount: 1,
            uploadAsync: false, //默认异步上传
            dropZoneEnabled: false,//是否显示拖拽区域
            enctype: 'multipart/form-data',
            showCaption: true,
            showUpload: false,
            showRemove: true,
            showClose: true,
            previewFileType:['avi', 'mp4', 'rmvb'],
            browseClass: "btn btn-primary", //按钮样式
            previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
            msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
        }).on("filebatchselected", function(event, files) {
            $('#fileName').fileinput("upload");
        }).on("filebatchuploadsuccess",function(event, data, previewId, index){
            if(data.response){
                console.log(data)
                Feng.success("上传成功");
                $('#classUrl').val(data.response.classUrl);
                // $('#videoId').val(data.response.classvideoId);
            }else{
                Feng.error("上传失败")
            }

        }).on('filebatchuploaderror', function(event, data, msg) {
            console.log(data);
            Feng.error("上传失败")
        });


    });
</script>
<script src="${ctxPath}/static/modular/huamao/sktClass/sktClass_info.js"></script>
<!--<script src="${ctxPath}/static/modular/huamao/sktClass/choseClassType.js"></script>-->
@}
